Repository navigation
fix(plugin-form): a placed row editor is not nested in a form, and a save refused on placed lines marks their tab - #36088
Conversation
…wrapper form The expanded row editor is an ObjectForm of its own, so its placement in a group slot draws no wrapper form: a form inside a form is a nesting React refuses. Pinned: the editor's inputs are owned by its own form and no nesting warning is logged. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6bhgW85kwjGaz7HqsmEuv
…olds them In a tabbed master-detail form a group-placed line table lives in a tab of its own. A batch the server refuses on a line (the failed operation is a line's, or the refused field is one only the lines write) now marks that tab the way a refused header field marks its own: the slot store records the refused collections, the tabbed form rebuilds its slot rows from it, and the form renderer marks the tab of a refused slot row. The mark retires when the next save gets past validation. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6bhgW85kwjGaz7HqsmEuv
|
repo:objectstack#1 · os-sales · session_01L6bhgW85kwjGaz7HqsmEuv Final green head · 2026-11-21T13:27Z · area b1-DB
|
|
repo:objectstack#1 · os-sales · session_01L6bhgTcFanGhTvqS1V2Q4U 席位核对 — ACCEPT (L1-a)维护者速读这个 PR 是「明细表放在字段分组处」那项工作留下的两条收尾,两条都做到了:
我核过以下几点:
没有需要修的问题,不属于受管面,不需要 L2,可以按普通队列合并,合并后卡 #36019 关闭。下面记了两条小观察,不挡合并。 Head reviewed: What holds
Observations (no change asked)
Landing terms
|
|
repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob Seat landing · 2026-11-21T13:32Z · The b1-DB PR for #36019: a line table placed in a form's field group opens its row editor without nesting a form inside a form (the S2 patch from #36009, re-applied on main), and a line refused on Save now marks the tab that holds the placed lines, styled like a header-field error. The marker sits in the components form renderer and reads refusals recorded in |
Requested by Sales · project thread
Fixes #36019
Clause-②: no
Metadata-protocol: none
Skills-docs: none — no authorable key and no behaviour a skill teaches moves
repo:objectstack#1 · os-sales · session_01L6bhgW85kwjGaz7HqsmEuv
维护者速读
What changes
FormSlotPlacementtakesownsForm: when its children already are a form of their own, it portals them into the slot with no wrapper form. The expanded row editor (anObjectForm, its only other control atype="button") is placed withownsForm, so its form is no longer a React child of the slot's wrapper form, and React's DOM-nesting check stops logging "form cannot be a descendant of form". This is the measured S2 patch, re-applied on main (git apply --checkclean, offsets +24/+78).attributeRecordEditRefusalreads: the operation the server names indetails.failedOperation.indexwhen it names one (a line's operation, never operation 0, the parent), else each field infields[]that only line operations write. A field the parent operation carries stays the header form's to mark.FormSlotStorerecords those collection ids (refuse(ids), cleared when the next save gets past validation, as the renderer clears its own markers).TabbedFormsubscribes to the store and rebuilds its slot rows, each carryingslotRefusedwhen its collection was refused. The form renderer'serroredFieldTabsmarks the tab of a refused slot row with the treatment a refused header field gets (data-error, destructive text, the dot).No export, prop or i18n key is added.
FormSlotHostandFormSlotRowlive informSlots.ts, which@object-ui/plugin-formdoes not export. The renderer readsslotRefusedoff aform-slotrow the same way it readsslotRef: a key only a host can produce.Tests
MasterDetailForm.groupPlacement-35889.test.tsx, existing describe: an expanded row editor opens in the slot beside its collection, its inputs are owned by its own form, and no nesting warning is logged.formSlots.test.ts:refusemarks the slot row until retired, de-duplicates, and an equal refusal emits nothing.All readings at head
9ac514e3.Suites and type-check
pnpm exec vitest run --maxWorkers=2 packages/plugin-form/ packages/components/src/renderers/form/(fromui/, under the verify lock):Test Files 332 passed (332),Tests 3359 passed | 18 skipped (3377),VERDICT command-exit 0.pnpm --filter @object-ui/plugin-form --filter @object-ui/components run type-check(both runtsc --noEmit && tsc -p tsconfig.test.json):VERDICT command-exit 0.eslintover the six changed source and test files: 0 errors (106 warnings, all on lines this diff does not touch).Ablations (one per fix, through `scripts/ablation-replace.mjs`, restore proven)
ownsFormremoved from the row editor's placement (anchor 1 to 0, blob632b58a14b7dtof73ce79e3a8b). The nesting pin goes red with React's own message, "In HTML, a FORM cannot be a descendant of a FORM" (its DOM-nesting check);Tests 1 failed | 10 passed (11). Restored: blob equals HEAD (632b58a14b7d),git diff HEADempty. This mutation is the code onmain, so the pin fails onmainand passes with the fix.slotStore.refuse(...)call insendBatch's catch deleted (anchor 1 to 0, blob to2e2969a6db0b). Both tab pins go red, and the control (a header-field refusal) stays green;Tests 2 failed | 9 passed (11). Restored: blob equals HEAD,git diff HEADempty.Derived gate families
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack: 38 commands. Every one exited 0.--ranreconciliation: "38 derived famil(ies) accounted for — 38 run, 0 NOT-MEASURED (a DERIVED zero — all 38 recorded an exit code and none of them is 3)". The type-check lanes, artifact rosters and wide-population families are CI's.Overlap
node scripts/pm/overlap-check.mjs --branch=HEAD --pr=36039,36054: origin/main, #36039 and #36054 each merge cleanly,VERDICT clean exit 0.Acceptance notes
ui/packages/components/src/renderers/form/form.tsx), not byTabbedForm, and the refusal travels throughformSlots.ts. Both are named here.Verification
Two-minute check:
pnpm --dir ui exec vitest run --maxWorkers=2 packages/plugin-form/src/MasterDetailForm.groupPlacement-35889.test.tsx: expect 11 tests passed.Read first: (1)
MasterDetailForm.tsxrefusedChildObjectsand its call insendBatch(which refusals count as a line's); (2)form.tsxerroredFieldTabs(the renderer's new read); (3)TabbedForm.tsxtheuseSyncExternalStoreon the slot host.🤖 Generated with Claude Code
https://claude.ai/code/session_01L6bhgW85kwjGaz7HqsmEuv